﻿using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
namespace BPM.Web.Shared.Data;

/// <summary>
/// 组织机构参数
/// </summary>
public class OrgOutput : BaseVM
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [DisplayName("业务号")]
    [Required(ErrorMessage = "业务号不能为空")]
    [JsonPropertyName("id")]
    public long Id { get; set; }

    [DisplayName("机构类型")]
    [Required]
    public OrgTypeEnum OrgType { get; set; }

    /// <summary>
    /// 父Id
    /// </summary>
    [DisplayName("上级机构")]
    [JsonPropertyName("pid")]
    [Required]
    public long Pid { get; set; }

    /// <summary>
    /// 父Ids
    /// </summary>
    [DisplayName("父Ids")]
    [JsonPropertyName("pids")]
    public string? Pids { get; set; }

    /// <summary>
    /// 名称
    /// </summary>
    [DisplayName("机构名称")]
    [JsonPropertyName("name")]
    [Required]
    public string? Name { get; set; }

    /// <summary>
    /// 编码
    /// </summary>
    [DisplayName("唯一编码")]
    [JsonPropertyName("code")]
    [Required]
    public string? Code { get; set; }

    /// <summary>
    /// 电话
    /// </summary>
    [DisplayName("电话")]
    [JsonPropertyName("tel")]
    public string? Tel { get; set; }

    /// <summary>
    /// 排序
    /// </summary>
    [DisplayName("排序")]
    [JsonPropertyName("sort")]
    public int Sort { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    [DisplayName("备注")]
    [JsonPropertyName("remark")]
    public string? Remark { get; set; }

    /// <summary>
    /// 状态（字典 0正常 1停用 2删除）
    /// </summary>
    [DisplayName("状态（字典 0正常 1停用 2删除）")]
    [JsonPropertyName("status")]
    public int Status { get; set; }
}
